<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="author" content="Dominik Reichl" />

	<meta name="description" content="KeePass is an open source password manager. Passwords can be stored in highly-encrypted databases, which can be unlocked with one master password or key file." />
	<meta name="keywords" content="KeePass, Password, Safe, Security, Database, Encryption, Secure, Manager, Open, Source, Free, Code, Key, Master, Disk, Dominik, Reichl" />

	<meta name="robots" content="index" />

	<meta name="DC.Title" content="KeePass - The Open Source Password Manager" />
	<meta name="DC.Creator" content="Dominik Reichl" />
	<meta name="DC.Subject" content="Open-Source Password Safe" />
	<meta name="DC.Description" content="KeePass is an open source password manager. Passwords can be stored in highly-encrypted databases, which can be unlocked with one master password or key file." />
	<meta name="DC.Publisher" content="Dominik Reichl" />
	<meta name="DC.Contributor" content="Dominik Reichl" />
	<meta name="DC.Type" content="text" />
	<meta name="DC.Format" content="text/html" />
	<meta name="DC.Identifier" content="http://keepass.info/" />
	<meta name="DC.Language" content="en" />
	<meta name="DC.Rights" content="Copyright (c) 2003-2013 Dominik Reichl" />

	<title>Password Generator - KeePass</title>
	<base target="_self" />
	<link rel="stylesheet" type="text/css" href="../../default.css" />
	
</head>
<body>





<table class="sectionsummary"><tr><td width="68px">
<img src="../images/b64x64_kgpg.png" width="64px" height="64px"
class="singleimg" align="left" alt="Security" />
</td><td valign="middle"><h1>Password Generator</h1><br />
Details about the built-in password generator of KeePass.
</td></tr></table>

<br />

<ul>
<li><a href="#charset">Generation Based on Character Sets</a></li>
<li><a href="#pattern">Generation Based on Patterns</a></li>
<li><a href="#rules">Generating Passwords that Follow Rules</a></li>
<li><a href="#secreduc">Security-Reducing Options</a></li>
<li><a href="#profiles">Creating and Using Password Generator Profiles</a></li>
<li><a href="#configauto">Configuring Settings of Automatically Generated Passwords for New Entries</a></li>
</ul>

<br />

<a name="charset"></a>
<h2 class="sectiontitle">
<img src="../images/b16x16_help.png" class="singleimg" alt="Help" />&nbsp;&nbsp;Generation
Based on Character Sets</h2>

<p>This password generation method is the recommended way to generate random passwords.
Other methods (pattern-based generation, ...) should only be used if passwords must
follow special rules or fulfill certain conditions.</p>

<p>Generation based on a character set is very simple. You simply let KeePass know
which characters can be used (i.e. upper-case letters, digits, ...) and KeePass will
randomly pick characters out of the set.</p>

<p><b>Defining a Character Set:</b><br />
The character set can be defined directly in the password generator window. For convenience,
KeePass offers adding commonly used ranges of characters to the set. This is done by
ticking the appropriate check box. Additionally to these predefined character ranges, you
can specify characters manually: all characters that you enter in the <i>'Also include the
following characters'</i> text box will be directly added to the character set.</p>

<p>The characters that you enter in the <i>'Also include the following characters'</i>
text box are included in the character set from which the password generator randomly
chooses characters from.
This means that these additional characters are <em>allowed</em> to appear in the
generated passwords, but they are not <em>forced</em> to.
If you want to force that some characters appear in the generated passwords,
you have to use the pattern-based generation.</p>

<p><b>Character Sets are Sets:</b><br />
In mathematical terms, character sets are sets, not vectors. This means that characters
can not be added twice to the set. Either a character is in the set or it is not.</p>

<p>For example, if you enter <i>'AAAAB'</i> into the additional characters box, this is
exactly the same set as <i>'AB'</i>. <i>'A'</i> will <i>not</i> be 4 times as likely as <i>'B'</i>!
If you need to follow rules like <i>'character A is more likely than B'</i>, you must
use <a href="#rules">pattern-based generation + permuting password characters</a>.</p>

<p>KeePass will 'optimize' your character set by removing all duplicate characters. If
you'd enter the character set <i>'AAAAB'</i> into the additional characters box,
close and reopen the password generator, it'll show the shorter character set <i>'AB'</i>.
Similarly, if you tick the <i>Digits</i> check box and enter <i>'3'</i> into the
additional box, the <i>'3'</i> will be ignored because it is already included in the
<i>Digits</i> character range.</p>

<br />

<a name="pattern"></a>
<h2 class="sectiontitle">
<img src="../images/b16x16_help.png" class="singleimg" alt="Help" />&nbsp;&nbsp;Generation
Based on Patterns</h2>

<p>The password generator can create passwords using patterns. A pattern is a
string defining the layout of the new password. The following placeholders
are supported:</p>

<table class="tablebox">
<tr><th>Placeholder</th>
<th>Type</th>
<th>Character Set</th></tr>

<tr><td><code>a</code></td>
<td>Lower-Case Alphanumeric</td>
<td>abcdefghijklmnopqrstuvwxyz 0123456789</td></tr>

<tr><td><code>A</code></td>
<td>Mixed-Case Alphanumeric</td>
<td>ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789</td></tr>

<tr><td><code>U</code></td>
<td>Upper-Case Alphanumeric</td>
<td>ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789</td></tr>

<tr><td><code>d</code></td>
<td>Digit</td>
<td>0123456789</td></tr>

<tr><td><code>h</code></td>
<td>Lower-Case Hex Character</td>
<td>0123456789 abcdef</td></tr>

<tr><td><code>H</code></td>
<td>Upper-Case Hex Character</td>
<td>0123456789 ABCDEF</td></tr>

<tr><td><code>l</code></td>
<td>Lower-Case Letter</td>
<td>abcdefghijklmnopqrstuvwxyz</td></tr>

<tr><td><code>L</code></td>
<td>Mixed-Case Letter</td>
<td>ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz</td></tr>

<tr><td><code>u</code></td>
<td>Upper-Case Letter</td>
<td>ABCDEFGHIJKLMNOPQRSTUVWXYZ</td></tr>

<tr><td><code>v</code></td>
<td>Lower-Case Vowel</td>
<td>aeiou</td></tr>

<tr><td><code>V</code></td>
<td>Mixed-Case Vowel</td>
<td>AEIOU aeiou</td></tr>

<tr><td><code>Z</code></td>
<td>Upper-Case Vowel</td>
<td>AEIOU</td></tr>

<tr><td><code>c</code></td>
<td>Lower-Case Consonant</td>
<td>bcdfghjklmnpqrstvwxyz</td></tr>

<tr><td><code>C</code></td>
<td>Mixed-Case Consonant</td>
<td>BCDFGHJKLMNPQRSTVWXYZ bcdfghjklmnpqrstvwxyz</td></tr>

<tr><td><code>z</code></td>
<td>Upper-Case Consonant</td>
<td>BCDFGHJKLMNPQRSTVWXYZ</td></tr>

<tr><td><code>p</code></td>
<td>Punctuation</td>
<td>,.;:</td></tr>

<tr><td><code>b</code></td>
<td>Bracket</td>
<td>()[]{}&lt;&gt;</td></tr>

<tr><td><code>s</code></td>
<td>Printable 7-Bit Special Character</td>
<td>!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^_&#96;{|}~</td></tr>

<tr><td><code>S</code></td>
<td>Printable 7-Bit ASCII</td>
<td>A-Z, a-z, 0-9, !&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^_&#96;{|}~</td></tr>

<tr><td><code>x</code></td>
<td>High ANSI</td>
<td>From '~' to U255 (excluding U255).</td></tr>

<tr><td><code>&#92;</code></td>
<td>Escape (Fixed Char)</td>
<td>Use following character as is.</td></tr>

<tr><td><code>{<i>n</i>}</code></td>
<td>Escape (Repeat)</td>
<td>Repeat the previous character <i>n</i> times.</td></tr>

<tr><td><code>[<i>...</i>]</code></td>
<td>Custom Char Set</td>
<td>Define a custom character set.</td></tr>

</table>

<p>The <b>&#92;</b> placeholder is special: it's an escape character. The next character that follows
the <b>&#92;</b> is written directly into the generated password. If you want a <code>&#92;</code> in your
password at a specific place, you have to write <code>&#92;&#92;</code>.</p>

<p>Using the <b>{<i>n</i>}</b> code you can define how many times the previous placeholder
should occur. The <b>{ }</b> operator duplicates placeholders, not generated characters. Examples:<br />
&raquo; <code>d{4}</code> is equivalent to <code>dddd</code>,<br />
&raquo; <code>dH{4}a</code> is equivalent to <code>dHHHHa</code> and<br />
&raquo; <code>Hda{1}dH</code> is equivalent to <code>HdadH</code>.</p>

<p>The <b>[<i>...</i>]</b> notation can be used to define a custom character set, from which
the password generator will pick one character randomly. All characters between the '<b>[</b>'
and '<b>]</b>' brackets follow the same rules as the placeholders above. Examples:<br />
&raquo; <code>[dp]</code> generates exactly 1 random character out of the set
digits + punctuation,<br />
&raquo; <code>[d&#92;m&#92;@]{5}</code> generates 5 characters out of the set &quot;0123456789m@&quot;,<br />
&raquo; <code>[u&#92;_][u&#92;_]</code> generates 2 characters out of the set upper case + '_'.</p>

<p><b>More examples:</b></p>

<p><code>ddddd</code><br />
Generates for example: 41922, 12733, 43960, 07660, 12390, 74680, ...</p>

<p><code>&#92;H&#92;e&#92;x&#92;:&#92; HHHHHH</code><br />
Generates for example: 'Hex: 13567A', 'Hex: A6B99D', 'Hex: 02243C', ...</p>

<p><b>Common Password Patterns:</b></p>

<table class="tablebox">
<tr><th>Name</th>
<th>Pattern</th>
</tr>

<tr><td>WEP Hex Key - 40 Bit</td>
<td>h{10}</td></tr>

<tr><td>WEP Hex Key - 128 Bit</td>
<td>h{32}</td></tr>

<tr><td>WEP Hex Key - 256 Bit</td>
<td>h{64}</td></tr>

<tr><td>Random MAC Address</td>
<td>HH\-HH\-HH\-HH\-HH\-HH</td></tr>

<!-- <tr><td>Random E-Mail Address</td>
<td>LA{11}\@LA{5}\.\c\o\m</td></tr> -->

</table>

<br /><br />

<a name="rules"></a>
<h2 class="sectiontitle">
<img src="../images/b16x16_help.png" class="singleimg" alt="Help" />&nbsp;&nbsp;Generating
Passwords that Follow Rules</h2>

<p>Below are a few examples how the pattern generation feature can be used to generate
passwords that follow certain rules.</p>

<p><i>Important! For all of the following examples you must enable the 'Randomly permute
characters of password' option!</i></p>

<table class="tablebox">
<tr><th>Rule</th>
<th>Pattern</th>
</tr>

<tr><td>Must consist of 2 upper case, 2 lower case characters and 2 digits</td>
<td nowrap="nowrap">uulldd</td></tr>

<tr><td>Must consist of 9 digits and 1 letter</td>
<td nowrap="nowrap">d{9}L</td></tr>

<tr><td>Must consist of 10 alphanumeric characters, where at least 1 is a letter and
at least 1 is a digit</td>
<td nowrap="nowrap">LdA{8}</td></tr>

<tr><td>Must consist of 10 alphanumeric characters, where at least 2 are upper case
and at least are 2 lower case characters</td>
<td nowrap="nowrap">uullA{6}</td></tr>

<tr><td>Must consist of 9 characters out of the set &quot;ABCDEF&quot; and an '@' symbol somewhere in it</td>
<td nowrap="nowrap">\@[\A\B\C\D\E\F]{9}</td></tr>

</table>

<br /><br />

<a name="secreduc"></a>
<h2 class="sectiontitle">
<img src="../images/b16x16_help.png" class="singleimg" alt="Help" />&nbsp;&nbsp;Security-Reducing
Options</h2>

<p>The password generator supports several options like <i>'Each character must occur at most once'</i>,
<i>'Exclude look-alike characters'</i>, and a field to explicitly specify
characters that should not appear in generated passwords.</p>

<p>These options are reducing the security of generated passwords. You should
only enable them if you are forced to follow such rules by the website/application,
for which you are generating the password.</p>

<p>The options can be found in the <i>'Advanced'</i> dialog / tab page.</p>






<img src="../images/pwgen_adv_excltab.png" border="0px" align="right" alt="Tab Control" />
If you enable a security-reducing option, an exclamation mark (!)<br />
is appended to the <i>'Advanced'</i> tab.


<br /><br />

<a name="profiles"></a>
<h2 class="sectiontitle">
<img src="../images/b16x16_help.png" class="singleimg" alt="Help" />&nbsp;&nbsp;Creating
and Using Password Generator Profiles</h2>

<p>Password generator options (character set, length, pattern, ...) can be saved
as password generator profiles.</p>

<p><b>Creating/Modifying a Profile:</b></p>

<ol>
<li>Open the <i>Password Generator</i> window.</li>
<li>Specify all options of the new profile.</li>
<li>Click the <img src="../images/b16x16_filesaveas.png" class="singleimg"
alt="Save As" /> <i>Save as Profile</i> button.</li>
<li>Enter the name of the new profile, or select an existing profile name from
the drop-down list to overwrite it. Close the dialog with <i>OK</i>.</li>
<li>If you want to immediately create a password using the new profile,
click <i>OK/Accept</i>. Otherwise click <i>Cancel/Close</i> (the profile is not lost;
profile management is independent of password generation).</li>
</ol>

<p><b>Using a Profile:</b></p>

<p>To use a profile, simply select it from the drop-down profiles list
in the password generator window. All settings of this profile will be
restored accordingly.</p>

<br />

<a name="configauto"></a>
<h2 class="sectiontitle">
<img src="../images/b16x16_help.png" class="singleimg" alt="Help" />&nbsp;&nbsp;Configuring Settings
of Automatically Generated Passwords for New Entries</h2>

<p>When you create a new entry, KeePass will automatically generate a random
password for it. The properties of these generated passwords can be configured
in the password generator dialog.</p>

<p>To configure, specify the options of your choice and overwrite the
<i>'(Automatically generated passwords for new entries)'</i> profile (see
section above).</p>

<p><b>Disabling Automatically Generated Passwords:</b><br />
To disable automatically generated passwords for new entries, select
<i>'Generate using character set'</i> and specify <i>0</i> as password length.
Overwrite the appropriate profile (see above).</p>

</body></html>

